Extensively drug-resistant tuberculosis (XDR TB) has emerged as a significant global epidemic and poses a particular threat to HIV-infected individuals. With few effective drugs available for treatment, XDR TB carries an extremely high mortality. Bedaquiline is the first new TB drug to receive FDA approval in 40 years and has shown considerable promise in early clinical trials of MDR TB. The drug has not, however, been well-studied in patients with XDR TB or in those with HIV co-infection who are receiving antiretroviral therapy (ART). As a result, much remains unknown about the mechanisms of resistance to this potentially transformative drug, the potential drug-drug interactions with common antiretroviral medications, and its safety in XDR TB or HIV. South Africa has among the highest burden of HIV and TB in the world, including a rapidly expanding epidemic of drug-resistant TB and HIV co-infection. In 2013, the National Department of Health created a treatment program to make bedaquiline available to patients with XDR and pre-XDR TB in combination with an optimized background regimen. The collision of XDR TB and HIV in South Africa offers a unique opportunity to study bedaquiline in patients who could benefit substantially from it, yet who have been largely excluded from the clinical trials. In Aim 1, we propose a prospective cohort study of XDR and pre-XDR TB participants to identify the genetic mechanisms of resistance to bedaquiline. Among participants who develop resistance, we will conduct whole genome sequencing of M. tuberculosis isolates to identify genetic polymorphisms associated with resistance. In Aim 2, we will examine drug-drug interactions of bedaquiline with ART. Bedaquiline is recommended to be given with either nevirapine or lopinavir/ritonavir-based regimens, based on small, single- dose studies in healthy volunteers. We will conduct intensive and sparse pharmacokinetic sampling on participants receiving bedaquiline, with or without ART. In Aim 3, we will determine the safety of administering bedaquiline with other QT-prolonging TB medications. We hypothesize that the co-administration of bedaquiline with clofazimine or fluoroquinolones will lead to additive increases in the QT interval and may lead to life-threatening QT prolongation requiring discontinuation of one or more of these medications. Each aim of this study will answer a fundamental question about bedaquiline that will directly inform its use in South Africa and globally. Our study will draw from the largest non-trial cohort of patients receiving bedaquiline anywhere in the world. The NIH and the Federal TB Task Force have identified specific priority research areas for the interaction between HIV and drug-resistant TB. This application will focus on two such areas for bedaquiline-new markers of resistance and pharmacologic interactions with ART-in South Africa, the epicenter of the convergent epidemics of drug-resistant TB and HIV.